package com.byxx.gtz.devicemonitoringsysejb.op;

import javax.persistence.EntityManager;

public class OpManager {
	private EntityManager em = null;

	private OpRegion opRegion;
	private OpDeviceMonitor opDeviceMonitor;
	private OpDeviceScheme opDeviceScheme;
	private OpDeviceSchemeDetail opDeviceSchemeDetail;
	private OpParameter opParameter;
	private OpUsers opUsers;

	public OpManager(EntityManager em) {
		this.em = em;
	}

	public EntityManager getEm() {
		return this.em;
	}

    public OpDeviceMonitor getOpDeviceMonitor(){
    	if (this.opDeviceMonitor == null) {
			this.opDeviceMonitor = new OpDeviceMonitor(this);
		}
		return this.opDeviceMonitor;
    }
	
	public OpRegion getOpRegion(){
		if (this.opRegion == null) {
			this.opRegion = new OpRegion(this);
		}
		return this.opRegion;
	}
	
	 public OpDeviceScheme getOpDeviceScheme(){
	    	if (this.opDeviceScheme == null) {
				this.opDeviceScheme = new OpDeviceScheme(this);
			}
			return this.opDeviceScheme;
    }
	 
	 public OpDeviceSchemeDetail getOpDeviceSchemeDetail(){
	    	if (this.opDeviceSchemeDetail == null) {
				this.opDeviceSchemeDetail = new OpDeviceSchemeDetail(this);
			}
			return this.opDeviceSchemeDetail;
    }
	 
	 public OpParameter getOpParameter(){
	    	if (this.opParameter == null) {
				this.opParameter = new OpParameter(this);
			}
			return this.opParameter;
	 }
	 
	 public OpUsers getOpUsers(){
	    	if (this.opUsers == null) {
				this.opUsers = new OpUsers(this);
			}
			return this.opUsers;
	 }
	 

}